package com.esri.core.internal.value;

import java.util.ArrayList;
import org.codehaus.jackson.JsonParser;
import org.codehaus.jackson.JsonToken;
import org.codehaus.jackson.util.MinimalPrettyPrinter;

/* loaded from: classes.dex */
public class e {
    private int a;
    private String b;
    private ArrayList<String> c;

    private e() {
    }

    public int a() {
        return this.a;
    }

    public String b() {
        return this.b;
    }

    public String c() {
        StringBuffer stringBuffer = new StringBuffer();
        for (int i = 0; i < this.c.size(); i++) {
            stringBuffer.append(this.c.get(i));
            stringBuffer.append(MinimalPrettyPrinter.DEFAULT_ROOT_VALUE_SEPARATOR);
        }
        return stringBuffer.toString();
    }

    public static e a(JsonParser jsonParser) throws Exception {
        if (com.esri.core.internal.util.d.c(jsonParser)) {
            e eVar = new e();
            while (jsonParser.nextToken() != JsonToken.END_OBJECT) {
                String currentName = jsonParser.getCurrentName();
                jsonParser.nextToken();
                if (currentName.equals("code")) {
                    eVar.a = jsonParser.getIntValue();
                } else if (currentName.equals("message")) {
                    eVar.b = jsonParser.getText();
                } else if (currentName.equals("details")) {
                    if (jsonParser.getCurrentToken() == JsonToken.START_ARRAY) {
                        eVar.c = new ArrayList<>();
                        while (jsonParser.nextToken() != JsonToken.END_ARRAY) {
                            eVar.c.add(jsonParser.getText());
                        }
                    }
                } else {
                    jsonParser.skipChildren();
                }
            }
            return eVar;
        }
        return null;
    }
}
